Directional sensors are frequently used in small devices such as cameras, telephones and binoculars in order to determine an orientation of the device in relation to a constant variable. This variable may be, for example, the earth's magnetic field. Frequently, such sensors are used in combination with other sensors, for example, acceleration sensors.
The result of the directional determination may be adversely affected by local interfering influences. A constant offset of the determined directions in a predetermined direction may be caused, for example, by a magnetic object or a power line in the direct environment of such a multidimensional magnetic field sensor. Various approaches for compensating such an offset are available.
U.S. Pat. No. 7,340,362 B2 describes a method for compensating the offset of a three dimensional magnetic field sensor. Measured values are recorded during a predetermined calibration phase. If successive measured values are different from one another, a newly recorded measured value is stored until a predetermined number of measured values is reached. An offset of the measured values is determined later from the stored data.
U.S. Pat. No. 7,275,008 B2 describes another variant in which a geometric body having a number of measured values lying on its surface is determined. Parameters which define a deviation of the shape of this body from the geometric reference figure of a sphere are determined. The parameters are used for a mapping in order to compensate measured values.
However, most of the conventional compensation methods are either imprecise or require high computational complexity often exceeding the computational capacities of a processing unit in a mobile device.
An object of the present invention is to specify a compensation method of the forenamed type which operates precisely and requires only slight computational complexity.